<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h4>导入css</h4>
		<a href="https://cloud.tencent.com/developer/article/1879171">参考文章</a>
		<script type="text/javascript">
			fetch("/web-front/test.css").then(res => res.text()).then(res => {
						 console.log(res);
			})
		</script>
		<script type="module">
			// import sheet from './test.css' assert { type: 'css' };
			// document.adoptedStyleSheets = [sheet];
			let style = await import("./test.css", {
				assert: { type: 'css' }
			}); 
			console.log(style.default);
			document.adoptedStyleSheets = [style.default];
		</script>
	</body>
</html>